<?php
namespace app\admin\controller;
use think\Controller;
use think\Db;
class Cates extends Allow
{	 
    //查看分类
	public function getIndex(){
        $cateinfo = Db::table('t_admin_cates')->select();
        return $this->fetch('cates/index',['cateinfo'=>$cateinfo]);
    }

    //添加分类
    public function getAdd(){
    	$cate = Db::table('t_admin_cates')->where('pid','=','0')->select();
    	var_dump($cate);die;
        return view('cates/add',['cate'=>$cate]);
    }
}
